﻿// JScript 文件
document.write("<div id=\"loadinfo\" style=\"border-right: #000000 1px solid; border-top: #000000 1px solid; ");
document.write("    display: none; border-left: #000000 1px solid; width: 300px; border-bottom: #000000 1px solid; ");
document.write("    position: absolute; background-color: #ffffff;z-index:9999\"> ");
document.write("    <div style=\"text-align: right\"> ");
document.write("        <a href=\"#\" onclick=\"hideloadinfo()\"> ");
document.write("            <img alt=\"\" border=\"0\" height=\"19\" src=\"images/loading_close.gif\" width=\"19\" /></a></div> ");
document.write("    <div align=\"center\" style=\"width: 270px\"> ");
document.write("        <br /> ");
document.write("        <img alt=\"请稍等，页面正在载入...\" border=\"0\" src=\"images/loading.gif\" />正在读取数据请稍候...<br /> ");
document.write("    </div> ");
document.write("</div>        <div id=\"loadErrinfo\" align=\"center\" style=\"display: none;\"> ");
document.write("            获取数据出错...请刷新页面重试<br /> ");
document.write("            <br /> ");
document.write("        </div> ");
document.write("        <div id=\"loadTimeoutinfo\" align=\"center\" style=\"display: none;\"> ");
document.write("            获取数据超时...请刷新页面重试<br /> ");
document.write("            <br /> ");
document.write("        </div> ");
AjaxPro.timeoutPeriod = 60000;


AjaxPro.onError = function (e) {
    var le = document.getElementById("loadErrinfo");
    le.style.display = e ? "block" : "none";

}
AjaxPro.onTimeout = function (t) {

    var lt = document.getElementById("loadTimeoutinfo");
    lt.style.display = t ? "block" : "none";
}

function hide_show() {
    var windowWidth, windowHeight;
    var bodyheight = window.screen.availHeight;
    if (self.innerHeight) {  // all except Explorer 
        windowWidth = self.innerWidth;
        windowHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode 
        windowWidth = document.documentElement.clientWidth;
        windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers 
        windowWidth = document.body.clientWidth;
        windowHeight = document.body.clientHeight;
    }
    document.getElementById("loadErrinfo").style.display = "none";
    document.getElementById("loadTimeoutinfo").style.display = "none";
    var bodys = document.documentElement.scrollTop;
    document.getElementById('loadinfo').style.top = bodys + 100 + 'px';
    document.getElementById('loadinfo').style.left = (windowWidth - 300) / 2 + 'px';
    document.getElementById('loadinfo').style.display = "";
    window.status = "正在加载酒店数据..."
}

function hideloadinfo() {
    document.getElementById('loadinfo').style.display = "none";
    window.status = "";

}